<div class="panel panel-default panel-intro">
    <div class="panel-body newrow">
        <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST">
            <div class="row">
                <!-- 订单 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="orderid" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('OrderCode')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                        <input type="text" class="form-control"  placeholder="请选择订单" required readonly value="{$back.ordercode}" />
                    </div>
                </div>

                <!-- 联系人 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="contact" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Contact')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <input type="text" class="form-control" id="contact" name="contact" placeholder="{:__('Contact')}" value="{$back.contact}" />
                    </div>
                </div>

                <!-- 手机号 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="phone" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Phone')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <input type="text" class="form-control" id="phone" name="phone" placeholder="{:__('Phone')}" value="{$back.phone}" />
                    </div>
                </div>

                <!-- 联系人 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="contact" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Area')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                        <input id="region" date-rule="required;" class="form-control" data-toggle="city-picker" type="text" placeholder="{$back.region_text}" required placeholder="{:__('Area')}" value="{$back.region_text}" />
                        <input type="hidden" name="province" value="{$back.province}" />
                        <input type="hidden" name="city" value="{$back.city}" />
                        <input type="hidden" name="district" value="{$back.district}" />
                    </div>
                </div>

                <!-- 详细地址 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="address" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Address')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <input type="text" class="form-control" id="address" name="address" placeholder="{:__('Address')}" value="{$back.address}" />
                    </div>
                </div>
            </div>

            <div class="row">
                <!-- 物流公司 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="orderid" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Express')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                        {$express}
                    </div>
                </div>

                <!-- 物流单号 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="expresscode" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('ExpressCode')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <input type="text" class="form-control" id="expresscode" data-rule="required;" required name="expresscode" placeholder="{:__('ExpressCode')}" value="{$back.expresscode}" />
                    </div>
                </div>

                <!-- 备注 -->
                <div class="col-md-4 col-xs-12 form-group">
                    <label for="remark" class="control-label col-xs-12 col-md-4 col-sm-4">{:__('Remark')}:</label>
                    <div class="col-md-8 col-sm-8 col-xs-12">
                      <input type="text" class="form-control" id="remark" name="remark" placeholder="{:__('Remark')}" value="{$back.remark}" />
                    </div>
                </div>
            </div>
            
            <div class="row">
                <div class="form-group col-md-12 col-sm-12">
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap text-center" width="100%">
                        <thead>
                          <th>{:__('ProductName')}</th>
                          <th>{:__('ProductNums')}</th>
                          <th>{:__('ProductPrice')}</th>
                          <th>{:__('ProductTotal')}</th>
                        </thead>
                        <tbody id="OrderProduct">
                            {if condition="$product"}
                                {foreach $product as $item}
                                <tr style="text-align: center; vertical-align: middle; ">
                                    <td>{$item.products.name}</td>
                                    <td>{$item.nums}</td>
                                    <td>{$item.price}</td>
                                    <td>{$item.total}</td>
                                </tr>
                                {/foreach}
                            {/if}
                        </tbody>
                    </table>
                </div>
            </div>
            
            <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                    <button type="button" class="btn btn-default btn-embossed btn-close">{:__('Close')}</button>
                </div>
            </div>
        </form>
    </div>
</div>